<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 13] Field</TITLE>
<META NAME="author" CONTENT="Mark Grand and Jonathan Knudsen">
<META NAME="date" CONTENT="Fri Aug  8 17:12:54 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java Fundamental Classes Reference">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java Fundamental Classes Reference" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch13_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 13<br>The java.lang.reflect Package</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch13_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Field</H1>

<H2>Name</H2>

Field

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.13">Synopsis</A></h2>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Class Name:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.lang.reflect.Field</tt>

<p>
<DT CLASS=varlistentry>Superclass:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.lang.Object</tt>

<p>
<DT CLASS=varlistentry>Immediate Subclasses:<br>
<DD>

<P CLASS=para>
None

<p>
<DT CLASS=varlistentry>Interfaces Implemented:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.lang.reflect.Member</tt>

<p>
<DT CLASS=varlistentry>Availability:<br>
<DD>

<P CLASS=para>
New as of JDK 1.1 </DL>
</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.14">Description</A></h2>

<P CLASS=para>
The <tt CLASS=literal>Field</tt> 
class represents a variable or constant in a class. A <tt CLASS=literal>Field</tt> object can 
be obtained by calling the <tt CLASS=literal>getField()</tt> method of a <tt CLASS=literal>Class</tt> object. <tt CLASS=literal>Field</tt> 
includes methods for getting the name, modifiers, type, and declaring class 
of a field. The class also provides methods that can set and 
retrieve the value of a field for a particular object. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.15">Class Summary</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public final class java.lang.reflect.Field extends java.lang.Object
                   implements java.lang.reflect.Member {
  // Instance Methods
  public boolean equals(Object obj); 
  public native Object get(Object obj);
  public native boolean getBoolean(Object obj);
  public native byte getByte(Object obj);
  public native char getChar(Object obj);
  public Class getDeclaringClass();
  public native double getDouble(Object obj);
  public native float getFloat(Object obj);
  public native int getInt(Object obj);
  public native long getLong(Object obj);
  public native int getModifiers();
  public String getName();
  public native short getShort(Object obj);
  public Class getType();
  public int hashCode();
  public native void set(Object obj, Object value);
  public native void setBoolean(Object obj, boolean z);
  public native void setByte(Object obj, byte b);
  public native void setChar(Object obj, char c);
  public native void setDouble(Object obj, double d);
  public native void setFloat(Object obj, float f);
  public native void setInt(Object obj, int i);
  public native void setLong(Object obj, long l);
  public native void setShort(Object obj, short s);
  public String toString();
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.16">Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.30">equals</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.31">public boolean equals(Object obj)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The object to be compared with this object. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the objects are equal; 
<tt CLASS=literal>false</tt> if they are not. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Object.equals()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns <tt CLASS=literal>true</tt> if 
<tt CLASS=literal>obj</tt> is an instance of <tt CLASS=literal>Field</tt>, 
and it is equivalent to this <tt CLASS=literal>Field</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.31">get</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.32"><DIV CLASS=screen> <P> <PRE> public native Object get(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The value of this field in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object. If the 
field is declared <tt CLASS=literal>static</tt>, the 
<tt CLASS=literal>obj</tt> parameter is ignored. Otherwise, 
the object supplied must be an instance of the class that declares this 
field. If the field contains a value of a primitive type, the value is 
wrapped in an appropriate object, and the object is returned. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.32">getBoolean</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.33"><DIV CLASS=screen> <P> <PRE> public native boolean getBoolean(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>boolean</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>boolean</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>boolean</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.33">getByte</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.34"><DIV CLASS=screen> <P> <PRE> public native byte getByte(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>byte</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>byte</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>byte</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.34">getChar</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.35"><DIV CLASS=screen> <P> <PRE> public native char getChar(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>char</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>char</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>char</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.35">getDeclaringClass</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.36">public Class getDeclaringClass()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>The Class</tt> 
object that represents the class that declared this field. 

<p>
<DT CLASS=varlistentry>Implements<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Member.getDeclaringClass()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the <tt CLASS=literal>Class</tt> 
object for the class in which this field is declared. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.36">getDouble</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.37"><DIV CLASS=screen> <P> <PRE> public native double getDouble(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>double</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>double</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>double</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.37">getFloat</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.38"><DIV CLASS=screen> <P> <PRE> public native float getFloat(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>float</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>float</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>float</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.38">getInt</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.39"><DIV CLASS=screen> <P> <PRE> public native int getInt(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>int</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>int</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as an <tt CLASS=literal>int</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.39">getLong</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.40"><DIV CLASS=screen> <P> <PRE> public native long getLong(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>long</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>long</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>long</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.40">getModifiers</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.41">public native int getModifiers()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
An integer that represents the modifier keywords used 
to declare this field. 

<p>
<DT CLASS=varlistentry>Implements<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Member.getModifiers()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns an integer value that represents the modifiers of this 
field. The <tt CLASS=literal>Modifier</tt> class should decode the returned value. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.41">getName</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.42">public String getName()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The name of this field as a <tt CLASS=literal>String</tt>. 

<p>
<DT CLASS=varlistentry>Implements<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Member.getName()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the name of this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.42">getShort</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.43"><DIV CLASS=screen> <P> <PRE> public native short getShort(Object obj) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be retrieved. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>short</tt> value of this field 
in the given object. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not the correct type, 
or the field cannot be converted to a <tt CLASS=literal>short</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the value of this field in the given object as a <tt CLASS=literal>short</tt>. 
If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.43">getType</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.44">public Class getType()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>The Class</tt> 
object that represents the type of this field. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns the <tt CLASS=literal>Class</tt> 
object for the type of this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.44">hashCode</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.45">public int hashCode()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A hashcode for this object. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Object.hashCode()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns a hashcode for this <tt CLASS=literal>Field</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.45">set</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.46"><DIV CLASS=screen> <P> <PRE> public native void set(Object obj, Object value) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>value</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>value</tt> 
cannot be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
value. If the field is declared <tt CLASS=literal>static</tt>, 
the <tt CLASS=literal>obj</tt> parameter is ignored. 
Otherwise, the object supplied must be an instance of the class that declares 
this field. If the field contains a value of a primitive type, the given 
value is automatically unwrapped before it is used to set the value of 
the field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.46">setBoolean</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.47"><DIV CLASS=screen> <P> <PRE> public native void setBoolean(Object obj, boolean z) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>z</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>z</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>boolean</tt> value. If the field 
is declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.47">setByte</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.48"><DIV CLASS=screen> <P> <PRE> public native void setByte(Object obj, byte b) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>b</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>b</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>byte</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.48">setChar</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.49"><DIV CLASS=screen> <P> <PRE> public native void setChar(Object obj, char c) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>c</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>c</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>char</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.49">setDouble</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.50"><DIV CLASS=screen> <P> <PRE> public native void setDouble(Object obj, double d) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>d</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>d</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>double</tt> value. If the field 
is declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.50">setFloat</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.51"><DIV CLASS=screen> <P> <PRE> public native void setFloat(Object obj, float f) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>f</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>f</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>float</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.51">setInt</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.52"><DIV CLASS=screen> <P> <PRE> public native void setInt(Object obj, int i) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>i</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>i</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>int</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.52">setLong</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.53"><DIV CLASS=screen> <P> <PRE> public native void setLong(Object obj, long l) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>l</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>l</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>long</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.53">setShort</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.54"><DIV CLASS=screen> <P> <PRE> public native void setShort(Object obj, short s) throws IllegalArgumentException, IllegalAccessException </PRE> </DIV></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>obj</tt><br>
<DD>

<P CLASS=para>
The instance whose field value is to be set.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>s</tt><br>
<DD>

<P CLASS=para>
The new value. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is not an instance of 
the correct class, or <tt CLASS=literal>s</tt> cannot 
be converted to the correct type.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalAccessException</tt><br>
<DD>

<P CLASS=para>
If the field is not accessible or declared <tt CLASS=literal>final</tt>.

<p>
<DT CLASS=varlistentry><tt CLASS=literal>NullPointerException</tt><br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>obj</tt> is <tt CLASS=literal>null</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method sets the value of this field in the given object to the given 
<tt CLASS=literal>short</tt> value. If the field is 
declared <tt CLASS=literal>static</tt>, the <tt CLASS=literal>obj</tt> 
parameter is ignored. Otherwise, the object supplied must be an instance 
of the class that declares this field. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch13-REFSECT2-AUTOID.54">toString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch13-REFSECT3-AUTOID.55">public String toString()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A string representation of this object. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Object.toString()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method returns a string representation of this <tt CLASS=literal>Field</tt>. 
This string contains the access modifiers of the field, if any, followed 
by the type, the fully qualified name of the declaring class, a period, 
and the name of the field. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.17">Inherited Methods</A></h2>

<DIV CLASS=informaltable>
<P>
<TABLE CLASS=INFORMALTABLE>
<TR CLASS=row>
<TH ALIGN="LEFT">

<P CLASS=para>
Method</TH>
<TH ALIGN="LEFT">

<P CLASS=para>
Inherited From</TH>
<TH ALIGN="LEFT">

<P CLASS=para>
Method</TH>
<TH ALIGN="LEFT">

<P CLASS=para>
Inherited From</TH>
</TR>
<TR CLASS=row>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>clone()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>finalize()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>getClass()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>notify()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>notifyAll()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>wait()</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
<TR CLASS=row>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>wait(long)</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>wait(long, int)</tt></TD>
<TD ALIGN="LEFT">

<P CLASS=para>
<tt CLASS=literal>Object</tt></TD>
</TR>
</TABLE>
<P>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch13-REFSECT1-AUTOID.18">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Class</tt>, 
<tt CLASS=literal>Constructor</tt>, 
<tt CLASS=literal>IllegalAccessException</tt>, 
<tt CLASS=literal>IllegalArgumentException</tt>, 
<tt CLASS=literal>Member</tt>, 
<tt CLASS=literal>Method</tt>, 
<tt CLASS=literal>Modifier</tt>, 
<tt CLASS=literal>NullPointerException</tt>, 
<tt CLASS=literal>Object</tt> 
</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch13_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch13_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Constructor</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>InvocationTargetException</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
